package algorithm;

public class hannuoya {
    public static void main(String[] args) {
        hanuoTa("A","B","C",3);
        int a=4;
        System.out.println("第"+a+"天"+tuzi(a)+"只");
    }
    public static void hanuoTa(String frome,String temp,String to,int num){
        if(num==1){
            System.out.println("第一次"+frome+">>"+to);
        }else {
            hanuoTa(frome,to,temp,num-1);
            System.out.println("第二次"+frome+">>"+to);
            hanuoTa(temp,frome,to,num-1);
        }

    }
    public static int tuzi(int num){
        if(num==1||num==2){
            return 1;
        }
        return tuzi(num-2)+tuzi(num-1);

    }
}
